package lianxi;
//StringBuilder常用方法
public class Test1 {
    public static void main(String[] args) {
        String str="今天是个好日子，Hello World，哈哈哈！！";
        StringBuilder builder=new StringBuilder(str);
        //增加
        builder.append("嗝！！！");
        System.out.println(builder);
        //删
        builder.delete(1,6);
        System.out.println(builder);
        //改
        builder.replace(1,6,"天是个好日");
        System.out.println(builder);
        //插
        builder.insert(13,"1111111123456777");
        System.out.println(builder);

    }
}
